home *** CD-ROM | disk | FTP | other *** search
- /*****************************************************************************
- SoundsDe.js
-
- Encarta Virtual Globe 1999
-
- (c) Copyright Microsoft Corporation 1998
-
- Fly Through has site specific sounds/music. This include file contains
- the declerations for the data used by the functions which return which
- index to use in the media source nodes of the media graph. It is assumed
- that the data tables here are in sync with the MediaGraph control nodes,
- that contain the paths to the proper music. If one changes, make sure the
- other does as well. The media graph can be altered using AudioMan's
- MediaAuthor and the Sounds.mgd file. Cut and paste the control specification
- in to the TerrainCtl.htm file.
-
- This file is to be included by Flights.htm
-
- Owner = WHsu
- *****************************************************************************/
- // Here we decide which sound to play next. The way Stan Lepard would like things
- // to cycle is as such: Fusion, Wind, Radio/Site Sound, Wind, repeat
-
- var g_fSoundsEnabled = false;
- var g_fSoundsActive = false;
-
- var g_PlayList = new Array(4);
- var g_PlayIndex = 0;
- g_PlayList[0] = "PlayFusion()";
- g_PlayList[1] = "PlayWind()";
- g_PlayList[2] = "PlaySiteSound()";
- g_PlayList[3] = "PlayWind()";
-
- /* For debugging purposes only....
- var g_PlayList = new Array(2);
- var g_PlayIndex = 0;
- g_PlayList[0] = "PlayWind()";
- g_PlayList[1] = "PlaySiteSound()";
- var G_DEBUG_PLAY_COUNT=0;
- */
-
- var g_fRadioSoundReady = false;
- var g_fSiteSoundReady = false;
-
- // Set Sound Table for all sounds over all continents
- // Some of this structure is a vestiage of how things were originally set
- // up when there was a single html file for all the continents. Now that
- // there is a separate file for each continent some of the extra
- // dimensions aren't needed, but they aren't hurting so leave well
- // enough along.
- var g_SoundTable = new Array(6); // 3D array, [continent][site][lat/long/sound index]
-
- var g_Continent=1; // index to first dim of g_SoundTable
- var g_Continent_Num = 6; // 6 entries
- var g_Continent_Names = new Array(g_Continent_Num);
- var g_Continent_NA = 0;
- var g_Continent_SA = 1;
- var g_Continent_EU = 2;
- var g_Continent_AS = 3;
- var g_Continent_AF = 4;
- var g_Continent_AU = 5;
-
- g_Continent_Names[g_Continent_NA] = "NA"; // North America
- g_Continent_Names[g_Continent_SA] = "SA"; // South America
- g_Continent_Names[g_Continent_EU] = "EU"; // Europe
- g_Continent_Names[g_Continent_AS] = "AS"; // Asia
- g_Continent_Names[g_Continent_AF] = "AF"; // Africa
- g_Continent_Names[g_Continent_AU] = "AU"; // Austrialia
-
- var g_SiteSounds = "SiteSoundsXX"; // one of the continent names will be appended to match media graph node name
- var g_SiteSoundsNode; // node object corresponding to g_SiteSounds
- var g_RadioSoundsNode; // node object for Radio collection
- var g_WindSoundNode; // node object for Wind URLWav
- var g_fFusionSrcAllLoaded = false; // Since the number of fusion nodes vary, other global fusion variables declared in SoundsXX.js
-
- //
- // Range is the "radio range of the ship", the distance that site specific
- // sounds can be picked up. Array should match up with g_Continent_Names
- // units are in Lat, Long squared. See FindNearestSound.
- var g_Range = new Array(6);
- g_Range[g_Continent_NA] = 35; // A GUESS !!
- g_Range[g_Continent_SA] = 25; // A GUESS !!
- g_Range[g_Continent_EU] = 25; // A GUESS !!
- g_Range[g_Continent_AS] = 35; // A GUESS !!
- g_Range[g_Continent_AF] = 30; // A GUESS !!
- g_Range[g_Continent_AU] = 30; // A GUESS !!
-
- var g_indexLat = 0; // index to third dim of g_SoundTable
- var g_indexLong = 1;
- var g_indexSound = 2; // NOTE: if we continue using index numbers, then we can do without this field
-
-